package hu.arguscab.graphic;

import static org.lwjgl.opengl.GL11.*;


/**
 *
 * @author sharp
 */
public class Triangle extends DrawablePrimitive {

	private int a, m, halfA;

	public Triangle(int a, int m) {
		this.a = a;
		this.m = m;
		this.halfA = a/2;
	}

	@Override
	public int getGLType() {
		return GL_TRIANGLES;
	}

	@Override
	public void drawImpl() {
			glVertex2i(-halfA, -halfA);
			glVertex2i(m, 0);
			glVertex2i(-halfA, halfA);
	}


}
